<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: pipi
  Date: 2018/4/21
  Time: 22:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>报价系统</title>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="/build/css/app.css" media="all">
</head>

<body>
<div class="layui-layout layui-layout-admin kit-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">报价系统</div>
        <div class="layui-logo kit-logo-mobile">K</div>
        <ul class="layui-nav layui-layout-left kit-nav">
            <%--<li class="layui-nav-item"><a href="javascript:;">控制台</a></li>--%>
            <%--<li class="layui-nav-item"><a href="javascript:;">商品管理</a></li>--%>
            <%--<li class="layui-nav-item"><a href="javascript:;" id="pay"><i class="fa fa-gratipay" aria-hidden="true"></i> 捐赠我</a></li>--%>
            <%--<li class="layui-nav-item">--%>
                <%--<a href="javascript:;">其它系统</a>--%>
                <%--<dl class="layui-nav-child">--%>
                    <%--<dd><a href="javascript:;">邮件管理</a></dd>--%>
                    <%--<dd><a href="javascript:;">消息管理</a></dd>--%>
                    <%--<dd><a href="javascript:;">授权管理</a></dd>--%>
                <%--</dl>--%>
            <%--</li>--%>
        </ul>
        <ul class="layui-nav layui-layout-right kit-nav">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="/image/0.jpg" class="layui-nav-img">
                    <c:if test="${sessionScope.type==1}">
                        <input type="hidden" name="userName" value="${sessionScope.customer.customerNO}"/>
                        ${sessionScope.customer.customerName}
                    </c:if>
                    <c:if test="${sessionScope.type==2}">
                        <input type="hidden" name="userName" value="${sessionScope.user.username}"/>
                        ${sessionScope.user.username}
                    </c:if>
                    <input type="hidden" name="type" value="${sessionScope.type}"/>
                </a>
                <dl class="layui-nav-child">
                    <%--<c:if test="${sessionScope.type==1}">--%>
                        <%--<dd><a href="/customer/update?customerNO=${sessionScope.customer.customerNO}" target="content"></a></dd>--%>
                    <%--</c:if>--%>
                    <%--<c:if test="${sessionScope.type==2}">--%>
                        <%--<dd><a href="/user/update?username=${sessionScope.user.username}" target="content">修改密码</a></dd>--%>
                    <%--</c:if>--%>


                    <dd><a href="javascript:;">基本资料</a></dd>
                    <%--<dd><a href="javascript:;">安全设置</a></dd>--%>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="/logout"><i class="fa fa-sign-out" aria-hidden="true"></i> 注销</a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black kit-side">
        <div class="layui-side-scroll">
            <div class="kit-side-fold"><i class="fa fa-navicon" aria-hidden="true"></i></div>
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="kitNavbar" kit-navbar>
                <c:if test="${sessionScope.type==2}">
                <li class="layui-nav-item">
                    <a href="javascript:;" kit-target data-options="{url:'/customer/list',icon:'&#xe658;',title:'客户信息',id:'1'}"><i class="layui-icon">&#xe658;</i><span> 客户信息</span></a>
                </li>
                </c:if>
                <li class="layui-nav-item">
                    <a href="javascript:;" kit-target data-options="{url:'/product/list',icon:'&#xe658;',title:'产品信息',id:'2'}"><i class="layui-icon">&#xe658;</i><span> 产品信息</span></a>
                </li>

                <li class="layui-nav-item">
                    <a href="javascript:;" kit-target data-options="{url:'/order/list',icon:'&#xe658;',title:'报价查询',id:'3'}"><i class="layui-icon">&#xe658;</i><span>报价查询</span></a>
                </li>

                <c:if test="${sessionScope.type==2}">
                <li class="layui-nav-item">
                    <a href="javascript:;" kit-target data-options="{url:'/quotation/list',icon:'&#xe658;',title:'报价',id:'4'}"><i class="layui-icon">&#xe658;</i><span>报价记录</span></a>
                </li>
                </c:if>
                <c:if test="${sessionScope.type==2 and sessionScope.user.grade==1}">
                <li class="layui-nav-item">
                    <a href="javascript:;" data-url="/user/list" data-icon="fa-user" data-title="用户" kit-target data-id='5'><i class="fa fa-user" aria-hidden="true"></i><span> 用户</span></a>
                </li>
                </c:if>
            </ul>
        </div>
    </div>
    <div class="layui-body" id="container">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">主体内容加载中,请稍等...</div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        2018 &copy;
        <a href="#">报价系统</a>

    </div>
</div>
<script type="text/javascript">
    // var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");
    // document.write(unescape("%3Cspan id='cnzz_stat_icon_1264021086'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s22.cnzz.com/z_stat.php%3Fid%3D1264021086%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));
</script>
<script src="/plugins/layui/layui.js"></script>
<script>
    var message;
    layui.config({
        base: '/build/js/'
    }).use(['app', 'message'], function() {
        var app = layui.app,
            $ = layui.jquery,
            layer = layui.layer;
        //将message设置为全局以便子页面调用
        // message = layui.message;
        //主入口
        app.set({
            type: 'iframe'
        }).init();
        $('#pay').on('click', function() {
            layer.open({
                title: false,
                type: 1,
                content: '<img src="/build/images/pay.png" />',
                area: ['500px', '250px'],
                shadeClose: true
            });
        });
    });
</script>
</body>

</html>